package com.yide.myworld.api_result;

/**
 * 枚举了一些常用API操作码
 */
public enum ResultCode implements IEnumCode {


    /********************************************OSS***********************************************************/
    /*******/

    FILE_NAME_CAT_NOT_NULL("90000", "文件名不能为空"),

    FILE_TYPE_NOT_SUPPORT("90001", "文件类型不支持"),

    FILE_TOO_LARGE("90002","文件超出限定大小"),

    UPLOAD_FILE_ENUM_NOT_EXIST("90003","上传文件模块类型的枚举不正确"),

    PICTURE_DOWNLOAD_FAILED("90004","图片下载失败"),


    /**
     * 基本异常
     */
    SUCCESS("200", "操作成功"),

    FAILED("500", "操作失败"),

    UNAUTHORIZED("401", "暂未登录或token已经过期"),

    FORBIDDEN("403", "没有相关权限"),

    FEIGN_ERROR("501", "远程调用错误"),

    SYSTEM_FAIL("10000", "未知业务错误"),

    SYSTEM_BUSY("10001", "系统繁忙，请稍后再试"),

    DATE_FORMAT_ERROR("10002", "日期格式化错误"),

    ENCODING_ERROR("10003", "编码错误"),

    CHANNAL_ERROR("10004", "渠道错误"),

    TYPE_ERROR("10005", "类型错误"),

    VALIDATE_FAILED("10008", "参数检验失败"),

    FILE_TOO_LARGE("90002", "文件超出限定大小");


    private String code;
    private String message;

    private ResultCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}